Page({
    data:{
        works: [],
        name: ''
    },
    onLoad:function(options){
        // 生命周期函数--监听页面加载
        this.setData({
            name: '',
            works: [1,2,3]
        })
        wx.playBackgroundAudio({
            dataUrl: 'http://sc1.111ttt.cn/2014/1/12/21/5210049055.mp3',
            title: '背景音药'
        })
    },
    onShareAppMessage: function() {
        // 用户点击右上角分享
        return {
          title: '优秀美术作品评选大赛' // 分享标题
        //   desc: 'desc', // 分享描述
        //   path: 'path' // 分享路径
        }
    },
    getUser(e){
        console.log(e,';e')
        wx.navigateTo({
            url: '/pages/user/user'
        })
    },
    loadMore(e){
        let readyData = this.data.works;
        const list = [{url: './../../assets/zuopin.jpeg'},{url: './../../assets/zuopin.jpeg'},{url: './../../assets/zuopin.jpeg'}]
        this.setData({
            works: readyData.concat(list)
        })
    },
})